﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AbetEvaluation.Master" AutoEventWireup="true"
	CodeBehind="AddOutcome.aspx.cs" Inherits="AbetEvaluation.AddOutcome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<asp:Panel ID="pnlOutcome" runat="server">
		<asp:DetailsView ID="dvOutcome" runat="server" Height="50px" Width="500px" 
			AutoGenerateRows="False" CellPadding="4" DataSourceID="dvOutcomeDataSource" 
			ForeColor="#333333" GridLines="None" 
			oniteminserted="dvOutcome_ItemInserted" DataKeyNames="ID" 
			oniteminserting="dvOutcome_ItemInserting" 
			onmodechanging="dvOutcome_ModeChanging">
			<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
			<CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
			<EditRowStyle BackColor="#999999" />
			<EmptyDataTemplate>
				<asp:Button ID="btnNewOutcome" runat="server" onclick="btnNewOutcome_Click" 
					Text="New Outcome" />
			</EmptyDataTemplate>
			<FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
			<Fields>
				<asp:BoundField DataField="ID" HeaderText="ID" Visible="False" />
				<asp:BoundField DataField="CreatedBy" HeaderText="Created By" Visible="False" />
				<asp:BoundField DataField="Title" HeaderText="Title" />
				<asp:BoundField DataField="Description" HeaderText="Description" />
				<asp:CommandField ShowEditButton="True" ShowInsertButton="True" />
			</Fields>
			<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
			<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
		</asp:DetailsView>
		<asp:ObjectDataSource ID="dvOutcomeDataSource" runat="server" 
			DataObjectTypeName="AbetEvaluation.Business.Outcome" 
			DeleteMethod="DeleteOutcome" InsertMethod="InsertOutcome" onselecting="DataSource_Selecting" 
			SelectMethod="GetOutcome" TypeName="AbetEvaluation.Business.Outcomes" 
			UpdateMethod="UpdateOutcome"></asp:ObjectDataSource>
	</asp:Panel>
	<asp:Panel ID="pnlQuestions" runat="server" Visible="False">
		<asp:GridView ID="gvQuestions" runat="server" AllowSorting="True" AutoGenerateColumns="False"
			DataKeyNames="QuestionID" DataSourceID="gvQuestionsDataSource" CellPadding="4"
			ForeColor="#333333" GridLines="None" Width="900px">
			<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
			<Columns>
				<asp:BoundField DataField="OutcomeID" HeaderText="OutcomeID" Visible="False" />
				<asp:BoundField DataField="QuestionID" HeaderText="QuestionID" Visible="False" />
				<asp:BoundField DataField="QuestionText" HeaderText="Question" />
				<asp:BoundField DataField="Answer" HeaderText="Answer" />
				<asp:BoundField DataField="Points" HeaderText="Points" />
				<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
			</Columns>
			<EditRowStyle BackColor="#999999" />
			<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
			<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
			<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
			<SortedAscendingCellStyle BackColor="#E9E7E2" />
			<SortedAscendingHeaderStyle BackColor="#506C8C" />
			<SortedDescendingCellStyle BackColor="#FFFDF8" />
			<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
		</asp:GridView>
		<asp:ObjectDataSource ID="gvQuestionsDataSource" runat="server" InsertMethod="InsertQuestion"
			OldValuesParameterFormatString="original_{0}" SelectMethod="GetQuestions" TypeName="AbetEvaluation.Business.Questions"
			OnSelecting="DataSource_Selecting" DataObjectTypeName="AbetEvaluation.Business.Question"
			DeleteMethod="DeleteQuestion" UpdateMethod="UpdateQuestion"></asp:ObjectDataSource>
		<asp:DetailsView ID="dvQuestions" runat="server" Height="50px" Width="500px" AutoGenerateRows="False"
			DataSourceID="dvQuestionsDataSource" DefaultMode="Insert" OnItemInserted="dvQuestions_ItemInserted"
			OnItemInserting="dvQuestions_ItemInserting" CellPadding="4" ForeColor="#333333"
			GridLines="None">
			<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
			<CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
			<EditRowStyle BackColor="#999999" />
			<FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
			<Fields>
				<asp:BoundField DataField="QuestionText" HeaderText="Question" />
				<asp:BoundField DataField="Points" HeaderText="Points" />
				<asp:TemplateField HeaderText="Answer">
					<InsertItemTemplate>
						<asp:RadioButton ID="radioYes" runat="server" Text="Yes" GroupName="radioAnswer" />
						&nbsp;
						<asp:RadioButton ID="radioNo" runat="server" Text="No" GroupName="radioAnswer" />
					</InsertItemTemplate>
				</asp:TemplateField>
				<asp:CommandField ShowInsertButton="True" />
			</Fields>
			<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
			<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
		</asp:DetailsView>
		<asp:ObjectDataSource ID="dvQuestionsDataSource" runat="server" DataObjectTypeName="AbetEvaluation.Business.Question"
			InsertMethod="InsertQuestion" SelectMethod="GetQuestions" TypeName="AbetEvaluation.Business.Questions">
		</asp:ObjectDataSource>
		<asp:Label ID="lblDebug" runat="server" Text=""></asp:Label>
	</asp:Panel>
	<asp:Panel ID="pnlRubrics" runat="server" Visible="False">
		<asp:GridView ID="gvRubric" runat="server" AutoGenerateColumns="False" CellPadding="4"
			DataKeyNames="RubricID" DataSourceID="gvRubricDataSource" ForeColor="#333333"
			GridLines="None" Width="900px">
			<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
			<Columns>
				<asp:BoundField DataField="RubricID" HeaderText="RubricID" Visible="False" />
				<asp:BoundField DataField="CategoryName" HeaderText="Category Name" />
				<asp:BoundField DataField="LowerBound" HeaderText="Lower Bound" />
				<asp:BoundField DataField="UpperBound" HeaderText="Upper Bound" />
				<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
			</Columns>
			<EditRowStyle BackColor="#999999" />
			<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
			<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
			<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
			<SortedAscendingCellStyle BackColor="#E9E7E2" />
			<SortedAscendingHeaderStyle BackColor="#506C8C" />
			<SortedDescendingCellStyle BackColor="#FFFDF8" />
			<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
		</asp:GridView>
		<asp:ObjectDataSource ID="gvRubricDataSource" runat="server" DataObjectTypeName="AbetEvaluation.Business.Rubric"
			DeleteMethod="DeleteRubric" OnSelecting="DataSource_Selecting" SelectMethod="GetRubrics"
			TypeName="AbetEvaluation.Business.Rubrics" UpdateMethod="UpdateRubric"></asp:ObjectDataSource>
		<asp:DetailsView ID="dvRubric" runat="server" Height="50px" Width="500px" AutoGenerateRows="False"
			CellPadding="4" DataSourceID="dvRubricDataSource" DefaultMode="Insert" ForeColor="#333333"
			GridLines="None" OnItemInserted="dvRubric_ItemInserted" 
			OnItemInserting="dvRubric_ItemInserting">
			<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
			<CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
			<EditRowStyle BackColor="#999999" />
			<FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
			<Fields>
				<asp:BoundField DataField="CategoryName" HeaderText="Category Name" />
				<asp:BoundField DataField="LowerBound" HeaderText="Lower Bound" />
				<asp:BoundField DataField="UpperBound" HeaderText="Upper Bound" />
				<asp:CommandField ShowInsertButton="True" />
			</Fields>
			<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
			<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
			<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
		</asp:DetailsView>
		<asp:ObjectDataSource ID="dvRubricDataSource" runat="server" DataObjectTypeName="AbetEvaluation.Business.Rubric"
			InsertMethod="InsertRubric" SelectMethod="GetRubrics" TypeName="AbetEvaluation.Business.Rubrics">
			<SelectParameters>
				<asp:Parameter DbType="Guid" Name="outcomeID" />
			</SelectParameters>
		</asp:ObjectDataSource>
	</asp:Panel>
</asp:Content>
